$(document).ajaxStart(function(){
    loadingVisabilityCtrl(true);
});

//Called when all Ajax requests have completed.
$(document).ajaxStop(function(){
    loadingVisabilityCtrl(false);
});

function loadingVisabilityCtrl(show)
{
    $("#loadingBar").css('display', (show===true)? 'block':'none');
    $("#loadingBarp").css('display', (show===true)? 'block':'none');
}

        
$(".hideit").delegate('','click', function() {

    $(this).fadeTo(200, 0.00, function(){ //fade
        $(this).slideUp(300, function() { //slide up
            $(this).remove(); //then remove from the DOM
        });
    });
});
